import request from '@/utils/request.js'

export const categoryListService = () => {
    return request.get('/api/category')
}

export const categoryDetailService = (id) => {
    return request.get(`/api/category/detail/${id}`)
}

export const categoryAddService = (categoryData) => {
    return request.post('/api/category', categoryData)
}

export const categoryUpdateService = (categoryData) => {
    return request.put('/api/category', categoryData)
}

export const categoryDeleteService = (id) => {
    return request.delete(`/api/category/${id}`)
}